# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kuserfeedback
pkgver=1.0.0
pkgrel=1
pkgdesc="Framework for collecting user feedback for applications via telemetry and surveys"
url="https://kde.org/products/frameworks/"
arch="all !armhf"
license="MIT"
depends_dev="qt5-qtbase-dev qt5-qtdeclarative-dev qt5-qtsvg-dev qt5-qttools-dev"
makedepends="$depends_dev extra-cmake-modules"
checkdepends="xvfb-run"
subpackages="$pkgname-dev $pkgname-lang"
source="https://download.kde.org/stable/kuserfeedback/kuserfeedback-$pkgver.tar.xz"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	make -C build
}

check() {
	cd build
	# openglinfosourcetest requires OpenGL
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest -E "openglinfosourcetest"
}

package() {
	DESTDIR="$pkgdir" make -C build install
}

sha512sums="d45c45b3f7b50f7ff3e5e5ae7e6a4cd68c0aa444553d0c44a969ae17e51ef5114ab6401c8ce65744ec3d635cb2edc7a127187547f01f4954faa55087c702dea7  kuserfeedback-1.0.0.tar.xz"
